package Text_43;

import java.util.ArrayList;
import java.util.Scanner;

public class Code {

	public static void main(String[] args) {
		ArrayList<Integer> list = new ArrayList();
		Scanner sc = new Scanner(System.in);
		System.out.println("请输入一个整数：");
		int num = sc.nextInt();
		list.add(0);
		list.add(1);
		//list.add(1);
		if(!(num>=0&&num<=1)){
            for(int i=2;i<=num;i++) {
			list.add(list.get(i-1)+list.get(i-2));
            }
            System.out.println( list.get(num));
        }else {
        	System.out.println(num);
        }
	}

}
